/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package Shared;

import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.ArrayList;

/**
 *
 * @author belal
 */
public interface ServerInt extends Remote {

    //interface for all methods for server
    public ArrayList<User> loginUser(User user, ClientInt cl) throws RemoteException;

    public int registerUser(User user) throws RemoteException;

    public int addFreind(User sender, String mailReciever) throws RemoteException;

    public ClientInt chatFreind(String mail) throws RemoteException;

    public void changeStatus(String mail, int status) throws RemoteException;

    public ArrayList<ClientInt> StartChatGroup(ArrayList<String> mails) throws RemoteException;

    public int checkMail(String email) throws RemoteException; // to check usermail

    //interface for all methods for server
    public void startConversation(String[] freindsMail) throws RemoteException;

    public boolean attachFile() throws RemoteException;

    public boolean deleteContact(String mail) throws RemoteException;

    public void saveChat(String text) throws RemoteException;

    public boolean sendMail(String fromMail, String toMail) throws RemoteException;

    public int countOnlineUsers() throws RemoteException;

    public void printName(String user) throws RemoteException;// malhash lazma

    public String checkPass(String email, String pass) throws RemoteException;

    public void signOut(String mail) throws RemoteException;// to check userpass

    public String getIdentifier() throws RemoteException;

    public void setIdentifier() throws RemoteException;

    public ArrayList<ClientInt> getMyFriends(ArrayList<String> mails) throws RemoteException;

    public void publishMessage(String msg) throws RemoteException;

    public int getUserCount() throws RemoteException;

    public ArrayList<User> getFriendList(String mail) throws RemoteException;

    public ArrayList<User> CheckFriendRequests(String mail) throws RemoteException;

    public ArrayList<User> updateFriendRequest(String sender, String reciever) throws RemoteException;
    
    public ArrayList<String> getAllMail() throws RemoteException;
    public void informStatus(ArrayList<User> friends) throws RemoteException;
}
